package com.loong.nnm.entity.devm;

import com.loong.nnm.entity.common.LayerProtocolName;
import com.loong.nnm.entity.common.LoopBackType;
import com.loong.nnm.entity.common.StatePacParameter;

public class CtpParameter {

    public enum PortRole {
        Root, Leaf, Symmetric
    }
    public enum ProtectRole{
        Null,
        Protected,
        primary,
        secondary
    }

    //     <ctp>
//          <name>x</name>
//          <state-pac>
//            <admin-state>disabled</admin-state>
//          </state-pac>
//          <layer-protocol-name xmlns:acc-gmetro="urn:ccsa:yang:acc-gmetro">acc-gmetro:OCH</layer-protocol-name>
//          <server-tp>x</server-tp>
//          <loop-back>terminal-loopback</loop-back>
//          <odu-ctp-pac xmlns="urn:ccsa:yang:acc-otn">
//            <odu-signal-type xmlns:otn-types="urn:ietf:params:xml:ns:yang:ietf-otn-types">otn-types:FC-1600</odu-signal-type>
//            <adaptation-type>CBR_BMP</adaptation-type>
//            <pmtrail-trace-expected-rx>x</pmtrail-trace-expected-rx>
//            <odu-delay-enable>
//              <odu-ctp-delay-enable>false</odu-ctp-delay-enable>
//            </odu-delay-enable>
//            <odu-delay-performance/>
//          </odu-ctp-pac>
//          <eth-ctp-pac xmlns="urn:ccsa:yang:acc-eth">
//            <vlan-spec>
//              <vlan-id>1</vlan-id>
//              <vlan-priority>0</vlan-priority>
//              <access-action>push_pop</access-action>
//              <vlan-type>s-tag</vlan-type>
//            </vlan-spec>
//            <client-vlan-spec>
//              <vlan-id>1</vlan-id>
//              <vlan-priority>0</vlan-priority>
//              <access-action>push_pop</access-action>
//              <vlan-type>s-tag</vlan-type>
//            </client-vlan-spec>
//            <oam-enable-pac>
//              <dm-enable>false</dm-enable>
//              <tm-enable>false</tm-enable>
//              <lm-enable>false</lm-enable>
//              <cc-enable>false</cc-enable>
//            </oam-enable-pac>
//            <oam-config>
//              <mep-id>0</mep-id>
//              <remote-mep-id>0</remote-mep-id>
//              <meg-id>x</meg-id>
//              <mel>0</mel>
//              <cc-interval>interval-10ms</cc-interval>
//              <lm-interval>interval-10ms</lm-interval>
//              <dm-interval>interval-10ms</dm-interval>
//            </oam-config>
//          </eth-ctp-pac>
//          <vc-ctp-pac xmlns="urn:ccsa:yang:acc-sdh">
//            <vc-type>VC3</vc-type>
//            <mapping-path>x</mapping-path>
//            <j1-actual-tx>x</j1-actual-tx>
//            <j1-expected-rx>x</j1-expected-rx>
//          </vc-ctp-pac>
//        </ctp>
    private String name;

    private StatePacParameter statePac;

    private LayerProtocolName layerProtocolName;

    private PortRole portRole;

    private ProtectRole protectRole;

    //可修改，承载该 CTP 的服务层 PTP/FTP
    private String serverTp;

    //环回类型可修改，做环回诊断
    private LoopBackType loopBack;


    @Override
    public String toString() {
        return "CtpParameter{" +
                "name='" + name + '\'' +
                ", statePac=" + statePac +
                ", layerProtocolName=" + layerProtocolName +
                ", portRole=" + portRole +
                ", protectRole=" + protectRole +
                ", serverTp='" + serverTp + '\'' +
                ", loopBack=" + loopBack +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public StatePacParameter getStatePac() {
        return statePac;
    }

    public void setStatePac(StatePacParameter statePac) {
        this.statePac = statePac;
    }

    public LayerProtocolName getLayerProtocolName() {
        return layerProtocolName;
    }

    public void setLayerProtocolName(LayerProtocolName layerProtocolName) {
        this.layerProtocolName = layerProtocolName;
    }

    public PortRole getPortRole() {
        return portRole;
    }

    public void setPortRole(PortRole portRole) {
        this.portRole = portRole;
    }

    public ProtectRole getProtectRole() {
        return protectRole;
    }

    public void setProtectRole(ProtectRole protectRole) {
        this.protectRole = protectRole;
    }

    public String getServerTp() {
        return serverTp;
    }

    public void setServerTp(String serverTp) {
        this.serverTp = serverTp;
    }

    public LoopBackType getLoopBack() {
        return loopBack;
    }

    public void setLoopBack(LoopBackType loopBack) {
        this.loopBack = loopBack;
    }
}
